package com.tao.controller;

import com.tao.entity.Product;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AxiosController {
    @RequestMapping("/helloAxios")
    public String helloAxios(String name,int age){
        return "测试成功！名字="+name+",年龄="+age;
    }
    @RequestMapping("/postAxios")
    public String postAxios(@RequestBody Product product){
        return "post测试成功！title="+product.getTitle()+",price="+product.getPrice()+"num="+product.getNum();
    }
}
